package cn.tedu.mm.admin.section.dao.persist.repository.impl;

import cn.tedu.mm.admin.section.dao.persist.mapper.AdminIndexMapper;
import cn.tedu.mm.admin.section.dao.persist.repository.AdminIndexRepository;
import cn.tedu.mm.admin.section.pojo.vo.AdminIndexInfoVO;
import cn.tedu.mm.admin.section.pojo.vo.IndexInfoVO;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class AdminIndexRepositoryImpl implements AdminIndexRepository {

    @Resource
    AdminIndexMapper indexMapper;


    /**
     * 用户总数
     */
    @Override
    public Integer userSum() {
        Integer userSum = indexMapper.userSum();
        return userSum;
    }

    /**
     * 管理员总数
     */
    @Override
    public Integer adminSum() {
        Integer adminSum = indexMapper.adminSum();
        return adminSum;
    }

    /**
     * 小说总数量
     */
    @Override
    public Integer fictionSum() {
        Integer fictionSum = indexMapper.fictionSum();
        return fictionSum;
    }

    @Override
    public AdminIndexInfoVO adminRole(Long id) {
        AdminIndexInfoVO infoVO = indexMapper.selectRole(id);
        return infoVO;
    }


}
